//
//  NSString+TCTDateFormatter.swift
//  SwiftTestDemo
//
//  Created by John on 2018/5/22.
//  Copyright © 2018年 company. All rights reserved.
//

import Foundation

extension String{
    
    func dateWithDateFormat(_ dateFormat:String) -> Date? {
        
        let dateFormatter:DateFormatter = TCTFormatter.sharedDateFormatter()
        
        dateFormatter.dateFormat = dateFormat
        
        return dateFormatter.date(from: self)
    }
    
}
